import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Route, Link } from 'react-router-dom';
import { ConnectedRouter } from './connected-react-router';
import history from './history';
import store from './store';
import Home from './components/Home';
import Counter from './components/Counter';

ReactDOM.render(
    <Provider store={store}>
        <ConnectedRouter history={history}>
            <ul>
                <li><Link to="/" exact="true">首页</Link></li>
                <li><Link to="/counter">计数器</Link></li>
            </ul>
            <Route path="/" exact={true} component={Home}></Route>
            <Route path="/counter" component={Counter}></Route>
        </ConnectedRouter>
    </Provider>,
    document.getElementById('root')
);
